<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GFileEnumerator: GIO Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="file_ops.html" title="File Operations">
<link rel="prev" href="GFileInfo.html" title="GFileInfo">
<link rel="next" href="gio-GIOError.html" title="GIOError">
<meta name="generator" content="GTK-Doc V1.26.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GFileEnumerator.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GFileEnumerator.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#GFileEnumerator.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="file_ops.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GFileInfo.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gio-GIOError.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GFileEnumerator"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GFileEnumerator.top_of_page"></a>GFileEnumerator</span></h2>
<p>GFileEnumerator — Enumerated Files Routines</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GFileEnumerator.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GFileEnumerator.html#g-file-enumerator-iterate" title="g_file_enumerator_iterate ()">g_file_enumerator_iterate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GFileInfo.html" title="GFileInfo"><span class="returnvalue">GFileInfo</span></a> *
</td>
<td class="function_name">
<a class="link" href="GFileEnumerator.html#g-file-enumerator-next-file" title="g_file_enumerator_next_file ()">g_file_enumerator_next_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GFileEnumerator.html#g-file-enumerator-close" title="g_file_enumerator_close ()">g_file_enumerator_close</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GFileEnumerator.html#g-file-enumerator-next-files-async" title="g_file_enumerator_next_files_async ()">g_file_enumerator_next_files_async</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
</td>
<td class="function_name">
<a class="link" href="GFileEnumerator.html#g-file-enumerator-next-files-finish" title="g_file_enumerator_next_files_finish ()">g_file_enumerator_next_files_finish</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GFileEnumerator.html#g-file-enumerator-close-async" title="g_file_enumerator_close_async ()">g_file_enumerator_close_async</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GFileEnumerator.html#g-file-enumerator-close-finish" title="g_file_enumerator_close_finish ()">g_file_enumerator_close_finish</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GFileEnumerator.html#g-file-enumerator-is-closed" title="g_file_enumerator_is_closed ()">g_file_enumerator_is_closed</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GFileEnumerator.html#g-file-enumerator-has-pending" title="g_file_enumerator_has_pending ()">g_file_enumerator_has_pending</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GFileEnumerator.html#g-file-enumerator-set-pending" title="g_file_enumerator_set_pending ()">g_file_enumerator_set_pending</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
</td>
<td class="function_name">
<a class="link" href="GFileEnumerator.html#g-file-enumerator-get-container" title="g_file_enumerator_get_container ()">g_file_enumerator_get_container</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
</td>
<td class="function_name">
<a class="link" href="GFileEnumerator.html#g-file-enumerator-get-child" title="g_file_enumerator_get_child ()">g_file_enumerator_get_child</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GFileEnumerator.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody><tr>
<td class="property_type">
<a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *</td>
<td class="property_name"><a class="link" href="GFileEnumerator.html#GFileEnumerator--container" title="The “container” property">container</a></td>
<td class="property_flags">Write / Construct Only</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GFileEnumerator.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GFileEnumerator.html#GFileEnumerator-struct" title="GFileEnumerator">GFileEnumerator</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GFileEnumerator.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="../gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
    <span class="lineart">╰──</span> GFileEnumerator
</pre>
</div>
<div class="refsect1">
<a name="GFileEnumerator.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gio/gio.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GFileEnumerator.description"></a><h2>Description</h2>
<p><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> allows you to operate on a set of <a href="GFile.html#GFile-struct"><span class="type">GFiles</span></a>, 
returning a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> structure for each file enumerated (e.g. 
<a class="link" href="GFile.html#g-file-enumerate-children" title="g_file_enumerate_children ()"><code class="function">g_file_enumerate_children()</code></a> will return a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> for each 
of the children within a directory).</p>
<p>To get the next file's information from a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a>, use 
<a class="link" href="GFileEnumerator.html#g-file-enumerator-next-file" title="g_file_enumerator_next_file ()"><code class="function">g_file_enumerator_next_file()</code></a> or its asynchronous version, 
<a class="link" href="GFileEnumerator.html#g-file-enumerator-next-files-async" title="g_file_enumerator_next_files_async ()"><code class="function">g_file_enumerator_next_files_async()</code></a>. Note that the asynchronous 
version will return a list of <a href="GFileInfo.html#GFileInfo-struct"><span class="type">GFileInfos</span></a>, whereas the 
synchronous will only return the next file in the enumerator.</p>
<p>The ordering of returned files is unspecified for non-Unix
platforms; for more information, see <a href="../glib-File-Utilities.html#g-dir-read-name"><code class="function">g_dir_read_name()</code></a>.  On Unix,
when operating on local files, returned files will be sorted by
inode number.  Effectively you can assume that the ordering of
returned files will be stable between successive calls (and
applications) assuming the directory is unchanged.</p>
<p>If your application needs a specific ordering, such as by name or
modification time, you will have to implement that in your
application code.</p>
<p>To close a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a>, use <a class="link" href="GFileEnumerator.html#g-file-enumerator-close" title="g_file_enumerator_close ()"><code class="function">g_file_enumerator_close()</code></a>, or 
its asynchronous version, <a class="link" href="GFileEnumerator.html#g-file-enumerator-close-async" title="g_file_enumerator_close_async ()"><code class="function">g_file_enumerator_close_async()</code></a>. Once 
a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> is closed, no further actions may be performed 
on it, and it should be freed with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</p>
</div>
<div class="refsect1">
<a name="GFileEnumerator.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="g-file-enumerator-iterate"></a><h3>g_file_enumerator_iterate ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
g_file_enumerator_iterate (<em class="parameter"><code><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> *direnum</code></em>,
                           <em class="parameter"><code><a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> **out_info</code></em>,
                           <em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> **out_child</code></em>,
                           <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                           <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>This is a version of <a class="link" href="GFileEnumerator.html#g-file-enumerator-next-file" title="g_file_enumerator_next_file ()"><code class="function">g_file_enumerator_next_file()</code></a> that's easier to
use correctly from C programs.  With <a class="link" href="GFileEnumerator.html#g-file-enumerator-next-file" title="g_file_enumerator_next_file ()"><code class="function">g_file_enumerator_next_file()</code></a>,
the gboolean return value signifies "end of iteration or error", which
requires allocation of a temporary <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</p>
<p>In contrast, with this function, a <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> return from
<a class="link" href="GFileEnumerator.html#g-file-enumerator-iterate" title="g_file_enumerator_iterate ()"><code class="function">g_file_enumerator_iterate()</code></a> *always* means
"error".  End of iteration is signaled by <em class="parameter"><code>out_info</code></em>
 or <em class="parameter"><code>out_child</code></em>
 being <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p>Another crucial difference is that the references for <em class="parameter"><code>out_info</code></em>
 and
<em class="parameter"><code>out_child</code></em>
 are owned by <em class="parameter"><code>direnum</code></em>
 (they are cached as hidden
properties).  You must not unref them in your own code.  This makes
memory management significantly easier for C code in combination
with loops.</p>
<p>Finally, this function optionally allows retrieving a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> as
well.</p>
<p>You must specify at least one of <em class="parameter"><code>out_info</code></em>
 or <em class="parameter"><code>out_child</code></em>
.</p>
<p>The code pattern for correctly using <a class="link" href="GFileEnumerator.html#g-file-enumerator-iterate" title="g_file_enumerator_iterate ()"><code class="function">g_file_enumerator_iterate()</code></a> from C
is:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13</pre></td>
        <td class="listing_code"><pre class="programlisting">direnum <span class="gtkdoc opt">=</span> <span class="function"><a href="GFile.html#g-file-enumerate-children">g_file_enumerate_children</a></span> <span class="gtkdoc opt">(</span>file<span class="gtkdoc opt">, ...);</span>
<span class="keyword">while</span> <span class="gtkdoc opt">(</span>TRUE<span class="gtkdoc opt">)</span>
  <span class="gtkdoc opt">{</span>
    GFileInfo <span class="gtkdoc opt">*</span>info<span class="gtkdoc opt">;</span>
    <span class="keyword">if</span> <span class="gtkdoc opt">(!</span><span class="function"><a href="GFileEnumerator.html#g-file-enumerator-iterate">g_file_enumerator_iterate</a></span> <span class="gtkdoc opt">(</span>direnum<span class="gtkdoc opt">, &amp;</span>info<span class="gtkdoc opt">,</span> NULL<span class="gtkdoc opt">,</span> cancellable<span class="gtkdoc opt">,</span> error<span class="gtkdoc opt">))</span>
      <span class="keyword">goto</span> out<span class="gtkdoc opt">;</span>
    <span class="keyword">if</span> <span class="gtkdoc opt">(!</span>info<span class="gtkdoc opt">)</span>
      <span class="keyword">break</span><span class="gtkdoc opt">;</span>
    <span class="gtkdoc opt">...</span> <span class="keyword">do</span> stuff with <span class="string">&quot;info&quot;</span><span class="gtkdoc opt">;</span> <span class="keyword">do not</span> unref it<span class="gtkdoc opt">! ...</span>
  <span class="gtkdoc opt">}</span>

out<span class="gtkdoc opt">:</span>
  <span class="function"><a href="../gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> <span class="gtkdoc opt">(</span>direnum<span class="gtkdoc opt">);</span> <span class="gtkdoc slc">// Note: frees the last &#64;info</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<div class="refsect3">
<a name="g-file-enumerator-iterate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>direnum</p></td>
<td class="parameter_description"><p>an open <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_info</p></td>
<td class="parameter_description"><p>Output location for the next <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>out_child</p></td>
<td class="parameter_description"><p>Output location for the next <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-44.html#api-index-2.44">2.44</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-file-enumerator-next-file"></a><h3>g_file_enumerator_next_file ()</h3>
<pre class="programlisting"><a class="link" href="GFileInfo.html" title="GFileInfo"><span class="returnvalue">GFileInfo</span></a> *
g_file_enumerator_next_file (<em class="parameter"><code><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> *enumerator</code></em>,
                             <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                             <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Returns information for the next file in the enumerated object.
Will block until the information is available. The <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> 
returned from this function will contain attributes that match the 
attribute string that was passed when the <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> was created.</p>
<p>See the documentation of <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> for information about the
order of returned files.</p>
<p>On error, returns <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and sets <em class="parameter"><code>error</code></em>
 to the error. If the
enumerator is at the end, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will be returned and <em class="parameter"><code>error</code></em>
 will
be unset.</p>
<div class="refsect3">
<a name="g-file-enumerator-next-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>enumerator</p></td>
<td class="parameter_description"><p>a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>location to store the error occurring, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-file-enumerator-next-file.returns"></a><h4>Returns</h4>
<p>A <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error
or end of enumerator.  Free the returned object with
<a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> when no longer needed. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-file-enumerator-close"></a><h3>g_file_enumerator_close ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
g_file_enumerator_close (<em class="parameter"><code><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> *enumerator</code></em>,
                         <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                         <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Releases all resources used by this enumerator, making the
enumerator return <a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a> on all calls.</p>
<p>This will be automatically called when the last reference
is dropped, but you might want to call this function to make 
sure resources are released as early as possible.</p>
<div class="refsect3">
<a name="g-file-enumerator-close.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>enumerator</p></td>
<td class="parameter_description"><p>a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>location to store the error occurring, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-file-enumerator-close.returns"></a><h4>Returns</h4>
<p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> on success or <a href="../glib-Standard-Macros.html#FALSE:CAPS"><span class="type">FALSE</span></a> on error.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-file-enumerator-next-files-async"></a><h3>g_file_enumerator_next_files_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_file_enumerator_next_files_async (<em class="parameter"><code><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> *enumerator</code></em>,
                                    <em class="parameter"><code><span class="type">int</span> num_files</code></em>,
                                    <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
                                    <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                    <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                    <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Request information for a number of files from the enumerator asynchronously.
When all i/o for the operation is finished the <em class="parameter"><code>callback</code></em>
 will be called with
the requested information. </p>
<p>See the documentation of <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> for information about the
order of returned files.</p>
<p>The callback can be called with less than <em class="parameter"><code>num_files</code></em>
 files in case of error
or at the end of the enumerator. In case of a partial error the callback will
be called with any succeeding items and no error, and on the next request the
error will be reported. If a request is cancelled the callback will be called
with <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a>.</p>
<p>During an async request no other sync and async calls are allowed, and will
result in <a class="link" href="gio-GIOError.html#G-IO-ERROR-PENDING:CAPS"><code class="literal">G_IO_ERROR_PENDING</code></a> errors. </p>
<p>Any outstanding i/o request with higher priority (lower numerical value) will
be executed before an outstanding request with lower priority. Default
priority is <a href="../glib-The-Main-Event-Loop.html#G-PRIORITY-DEFAULT:CAPS"><code class="literal">G_PRIORITY_DEFAULT</code></a>.</p>
<div class="refsect3">
<a name="g-file-enumerator-next-files-async.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>enumerator</p></td>
<td class="parameter_description"><p>a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>num_files</p></td>
<td class="parameter_description"><p>the number of file info objects to request</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>io_priority</p></td>
<td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>the data to pass to callback function. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-file-enumerator-next-files-finish"></a><h3>g_file_enumerator_next_files_finish ()</h3>
<pre class="programlisting"><a href="../glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
g_file_enumerator_next_files_finish (<em class="parameter"><code><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> *enumerator</code></em>,
                                     <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
                                     <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Finishes the asynchronous operation started with <a class="link" href="GFileEnumerator.html#g-file-enumerator-next-files-async" title="g_file_enumerator_next_files_async ()"><code class="function">g_file_enumerator_next_files_async()</code></a>.</p>
<div class="refsect3">
<a name="g-file-enumerator-next-files-finish.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>enumerator</p></td>
<td class="parameter_description"><p>a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>result</p></td>
<td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occurring, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to
ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-file-enumerator-next-files-finish.returns"></a><h4>Returns</h4>
<p>a <a href="../glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a href="GFileInfo.html#GFileInfo-struct"><span class="type">GFileInfos</span></a>. You must free the list with
<a href="../glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a> and unref the infos with <a href="../gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> when you're
done with them. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Gio.FileInfo]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-file-enumerator-close-async"></a><h3>g_file_enumerator_close_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_file_enumerator_close_async (<em class="parameter"><code><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> *enumerator</code></em>,
                               <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
                               <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                               <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                               <em class="parameter"><code><a href="../glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Asynchronously closes the file enumerator. </p>
<p>If <em class="parameter"><code>cancellable</code></em>
 is not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> will be returned in 
<a class="link" href="GFileEnumerator.html#g-file-enumerator-close-finish" title="g_file_enumerator_close_finish ()"><code class="function">g_file_enumerator_close_finish()</code></a>.</p>
<div class="refsect3">
<a name="g-file-enumerator-close-async.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>enumerator</p></td>
<td class="parameter_description"><p>a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>io_priority</p></td>
<td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html#io-priority" title="I/O Priority">I/O priority</a> of the request</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> to call when the request is satisfied. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>the data to pass to callback function. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-file-enumerator-close-finish"></a><h3>g_file_enumerator_close_finish ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
g_file_enumerator_close_finish (<em class="parameter"><code><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> *enumerator</code></em>,
                                <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>,
                                <em class="parameter"><code><a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Finishes closing a file enumerator, started from <a class="link" href="GFileEnumerator.html#g-file-enumerator-close-async" title="g_file_enumerator_close_async ()"><code class="function">g_file_enumerator_close_async()</code></a>.</p>
<p>If the file enumerator was already closed when <a class="link" href="GFileEnumerator.html#g-file-enumerator-close-async" title="g_file_enumerator_close_async ()"><code class="function">g_file_enumerator_close_async()</code></a> 
was called, then this function will report <a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a> in <em class="parameter"><code>error</code></em>
, and 
return <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>. If the file enumerator had pending operation when the close 
operation was started, then this function will report <a class="link" href="gio-GIOError.html#G-IO-ERROR-PENDING:CAPS"><code class="literal">G_IO_ERROR_PENDING</code></a>, and
return <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.  If <em class="parameter"><code>cancellable</code></em>
 was not <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation may have been 
cancelled by triggering the cancellable object from another thread. If the operation
was cancelled, the error <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> will be set, and <a href="../glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will be 
returned.</p>
<div class="refsect3">
<a name="g-file-enumerator-close-finish.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>enumerator</p></td>
<td class="parameter_description"><p>a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>result</p></td>
<td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <a href="../glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occurring, or <a href="../glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to
ignore.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-file-enumerator-close-finish.returns"></a><h4>Returns</h4>
<p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the close operation has finished successfully.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-file-enumerator-is-closed"></a><h3>g_file_enumerator_is_closed ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
g_file_enumerator_is_closed (<em class="parameter"><code><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> *enumerator</code></em>);</pre>
<p>Checks if the file enumerator has been closed.</p>
<div class="refsect3">
<a name="g-file-enumerator-is-closed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>enumerator</p></td>
<td class="parameter_description"><p>a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-file-enumerator-is-closed.returns"></a><h4>Returns</h4>
<p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>enumerator</code></em>
is closed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-file-enumerator-has-pending"></a><h3>g_file_enumerator_has_pending ()</h3>
<pre class="programlisting"><a href="../glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
g_file_enumerator_has_pending (<em class="parameter"><code><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> *enumerator</code></em>);</pre>
<p>Checks if the file enumerator has pending operations.</p>
<div class="refsect3">
<a name="g-file-enumerator-has-pending.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>enumerator</p></td>
<td class="parameter_description"><p>a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-file-enumerator-has-pending.returns"></a><h4>Returns</h4>
<p> <a href="../glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>enumerator</code></em>
has pending operations.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-file-enumerator-set-pending"></a><h3>g_file_enumerator_set_pending ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_file_enumerator_set_pending (<em class="parameter"><code><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> *enumerator</code></em>,
                               <em class="parameter"><code><a href="../glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> pending</code></em>);</pre>
<p>Sets the file enumerator as having pending operations.</p>
<div class="refsect3">
<a name="g-file-enumerator-set-pending.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>enumerator</p></td>
<td class="parameter_description"><p>a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pending</p></td>
<td class="parameter_description"><p>a boolean value.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-file-enumerator-get-container"></a><h3>g_file_enumerator_get_container ()</h3>
<pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
g_file_enumerator_get_container (<em class="parameter"><code><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> *enumerator</code></em>);</pre>
<p>Get the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> container which is being enumerated.</p>
<div class="refsect3">
<a name="g-file-enumerator-get-container.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>enumerator</p></td>
<td class="parameter_description"><p>a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-file-enumerator-get-container.returns"></a><h4>Returns</h4>
<p>the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> which is being enumerated. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-18.html#api-index-2.18">2.18</a></p>
</div>
<hr>
<div class="refsect2">
<a name="g-file-enumerator-get-child"></a><h3>g_file_enumerator_get_child ()</h3>
<pre class="programlisting"><a class="link" href="GFile.html" title="GFile"><span class="returnvalue">GFile</span></a> *
g_file_enumerator_get_child (<em class="parameter"><code><a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a> *enumerator</code></em>,
                             <em class="parameter"><code><a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> *info</code></em>);</pre>
<p>Return a new <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> which refers to the file named by <em class="parameter"><code>info</code></em>
 in the source
directory of <em class="parameter"><code>enumerator</code></em>
.  This function is primarily intended to be used
inside loops with <a class="link" href="GFileEnumerator.html#g-file-enumerator-next-file" title="g_file_enumerator_next_file ()"><code class="function">g_file_enumerator_next_file()</code></a>.</p>
<p>This is a convenience method that's equivalent to:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3</pre></td>
        <td class="listing_code"><pre class="programlisting">gchar <span class="gtkdoc opt">*</span>name <span class="gtkdoc opt">=</span> <span class="function"><a href="GFileInfo.html#g-file-info-get-name">g_file_info_get_name</a></span> <span class="gtkdoc opt">(</span>info<span class="gtkdoc opt">);</span>
GFile <span class="gtkdoc opt">*</span>child <span class="gtkdoc opt">=</span> <span class="function"><a href="GFile.html#g-file-get-child">g_file_get_child</a></span> <span class="gtkdoc opt">(</span><span class="function"><a href="GFileEnumerator.html#g-file-enumerator-get-container">g_file_enumerator_get_container</a></span> <span class="gtkdoc opt">(</span>enumr<span class="gtkdoc opt">),</span>
                                 name<span class="gtkdoc opt">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<div class="refsect3">
<a name="g-file-enumerator-get-child.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>enumerator</p></td>
<td class="parameter_description"><p>a <a class="link" href="GFileEnumerator.html" title="GFileEnumerator"><span class="type">GFileEnumerator</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p>a <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> gotten from <a class="link" href="GFileEnumerator.html#g-file-enumerator-next-file" title="g_file_enumerator_next_file ()"><code class="function">g_file_enumerator_next_file()</code></a>
or the async equivalents.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-file-enumerator-get-child.returns"></a><h4>Returns</h4>
<p>a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> for the <a class="link" href="GFileInfo.html" title="GFileInfo"><span class="type">GFileInfo</span></a> passed it. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-36.html#api-index-2.36">2.36</a></p>
</div>
</div>
<div class="refsect1">
<a name="GFileEnumerator.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GFileEnumerator-struct"></a><h3>GFileEnumerator</h3>
<pre class="programlisting">typedef struct _GFileEnumerator GFileEnumerator;</pre>
<p>A per matched file iterator.</p>
</div>
</div>
<div class="refsect1">
<a name="GFileEnumerator.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GFileEnumerator--container"></a><h3>The <code class="literal">“container”</code> property</h3>
<pre class="programlisting">  “container”                <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *</pre>
<p>The container that is being enumerated.</p>
<p>Flags: Write / Construct Only</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.26.1</div>
</body>
</html>